﻿using Abp.Domain.Entities.Auditing;
using SingleUserMall.Authorization.Users;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace SingleUserMall.Complains
{
    /// <summary>
    /// 投诉
    /// </summary>
    public class Complain : FullAuditedEntity<long>
    {
        /// <summary>
        /// 投诉图片
        /// </summary>
        public string Picture { get; set; }
        /// <summary>
        /// 审核状态
        /// </summary>
        public ComplainVerifyStatus Status { get; set; }
        /// <summary>
        /// 投诉类型
        /// </summary>
        public ComplainType ComplainType { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 投诉用户id
        /// </summary>
        public long UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual User User { get; set; }
        /// <summary>
        /// 原因
        /// </summary>
        public string Remark { get; set; }
    }
    /// <summary>
    /// 审核状态
    /// </summary>
    public enum ComplainVerifyStatus
    {
        /// <summary>
        /// 已驳回
        /// </summary>
        [Description("已驳回")]
        Rejected = -1,
        /// <summary>
        /// 等待审核
        /// </summary>
        [Description("待审核")]
        WaitAudit = 0,
        /// <summary>
        /// 已审核
        /// </summary>
        [Description("已审核")]
        Audited = 1,
    }

    /// <summary>
    /// 投诉类型
    /// </summary>
    public enum ComplainType
    {
        /// <summary>
        /// 诈骗
        /// </summary>
        [Description("诈骗")]
        ZP = 0,
        /// <summary>
        /// 假货
        /// </summary>
        [Description("假货")]
        JH = 1,
        /// <summary>
        /// 虚假信息
        /// </summary>
        [Description("虚假信息")]
        XJ = 2,
        /// <summary>
        /// 诱导行为
        /// </summary>
        [Description("诱导行为")]
        YD = 3
    }
}
